import React from 'react';
import { Select, Row, Col } from 'antd';

const HitHandleBySelectLogic = (props) => {
  const { value, disabled, onChange } = props;
  const types = [{ value: 'or', text: '或' }, { value: 'and', text: '并且' }];
  const handleChange = (value) => {
    onChange && onChange(value);
  };
  return (
    <Row>
      <Col span={2}>条件关系</Col>
      <Col span={8}>
        <Select value={value} onChange={handleChange} disabled={disabled}>
          {types.map((it) => (
            <Select.Option value={it.value} key={it.value}>
              {it.text}
            </Select.Option>
          ))}
        </Select>
      </Col>
    </Row>
  );
};
export default HitHandleBySelectLogic;
